package com.applet.orders.controller;


import com.applet.orders.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 订单管理 预支付订单结果响应(给微信服务调用)
 */
@Slf4j
@RestController
@RequestMapping("/notify")
public class PayNotifyController {

    @Resource
    private OrderService orderService;



    /**
     * 支付成功后  结果处理
     *           微信服务调用此接口
     */
    @PostMapping("/paySuccess")
    public void paymentSuccessNotify(HttpServletRequest request, HttpServletResponse response){
        orderService.paymentSuccessNotify(request, response);
    }

}
